package com.service;

import com.utils.DBUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Connection;
import java.sql.SQLException;

@Service
public class BuyService {

    @Autowired
    UserService userService;

    @Autowired
    OrderService orderService;

    public void buy(int total){
        userService.subBalance(total);
        orderService.createOrder();
    }


}
